using SharpGraphT.Graph.Builder;
using SharpGraphT.Util;

namespace SharpGraphT.Graph;

public class SimpleWeightedGraph<TV, TE> : SimpleGraph<TV, TE>
    where TE : class, new() {
    public SimpleWeightedGraph() :
        this(null, SupplierUtil.CreateSupplier<TE>()) { }

    public SimpleWeightedGraph(Func<TV> vertexSupplier, Func<TE> edgeSupplier) :
        base(vertexSupplier, edgeSupplier, true) { }

    public new static GraphBuilder<TV, TE, SimpleWeightedGraph<TV, TE>>
        CreateBuilder() =>
        new(new SimpleWeightedGraph<TV, TE>());

    public new static GraphBuilder<TV, TE, SimpleWeightedGraph<TV, TE>>
        CreateBuilder(Func<TE> edgeSupplier) =>
        new(new SimpleWeightedGraph<TV, TE>(null, edgeSupplier));
}